package picture2013.p11_16;

public class Main {

    public static void main(String[] args) {
        Picture p = new Picture(30, 20, '.');

        p.drawRect(1, 1, 4, 3, 'x');
        p.drawVerticalLine(4, 4, 10, '%');
        p.drawHorizontalLine(4, 4, 10, '*');

        p.drawPoint(15, 14, 'Q');
        System.out.println("This should be Q: " + p.getPoint(15, 14));

        p.print();

        System.out.println("picture p has size " + p.getWidth() + "x" + p.getHeight());

        //Проверим пункт 6
        Picture p2 = new Picture(5, 6, '!');
        p2.drawRect(1, 2, 3, 3, '?');
        p.drawPicture(14, 12, p2);
        p.print();

        //квадрат и прямоугольник
        p = new Picture(30, 20, '.');

        Square sq = new Square(3, 'x');
        Plus pl = new Plus(3, '+');
        Cross cr = new Cross(3, '*');

        sq.draw(p, 4, 5); //эти три строки эквиваленты
        p.drawSquare(sq, 4, 5);
        p.drawFigure(sq, 4, 5);

        pl.draw(p, 10, 5); //эти три строки эквиваленты
        p.drawPlus(pl, 10, 5);
        p.drawFigure(pl, 10, 5);

        cr.draw(p, 4, 15); //эти три строки эквиваленты
        p.drawCross(cr, 4, 15);
        p.drawFigure(cr, 4, 15);

        p.print();

        //проверим 16:
        p.drawPicture(10, 10, p2); //эти две строки эквиваленты
        p.drawFigure(p2, 10, 10);

        p.print();
    }

}
